<script setup lang="ts">
import Navbar from '@/components/TheNavbar.vue'
import PageLayout from '@/components/PageLayout.vue'
import { useRoute } from 'vue-router'
import { computed } from 'vue'

const route = useRoute()

// 判断当前是否在管理后台路由
const isAdminRoute = computed(() => {
  return route.path.startsWith('/admin')
})
</script>

<template>
  <template v-if="!isAdminRoute">
    <Navbar />
    <PageLayout>
      <router-view />
    </PageLayout>
  </template>
  <template v-else>
    <router-view />
  </template>
</template>

<style>
/* #app {
  min-height: 100vh;
} */
</style>
